home *** CD-ROM | disk | FTP | other *** search
- Path: www.rpa.net!news
- From: Fred Mellender <fredm@rpa.net>
- Newsgroups: comp.lang.c++
- Subject: Re: BC++5.0 Great! <NOT>
- Date: Sun, 31 Mar 1996 06:32:19 -0500
- Organization: Rochester Public Access, Inc.
- Message-ID: <315E6D43.2E0C@rpa.net>
- References: <315BEEBB.1261@mailport.delta-air.com>
- NNTP-Posting-Host: pm1-ip52.rpa.net
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (Win95; I)
-
- I had no difficulty getting the pgm below to compile (and run). I
- suspect Mr. Sadler left off the "std::" qualification, which would
- give an error which reads:
- "Use qualified name to access member type 'std::string' "
- which is pretty clear.
-
- Regards,
- --
- #include <string>
- #include <iostream.h>
- #include <stdio.h>
-
- int main(void)
- {
- std::string s1("hello world");
- cout << s1 << endl;
- getchar();
- return (0);
- }
- ---
-
- William E. Sadler wrote:
- >
- > Try this one folks:
- >
- > do the standard hello world:
- >
- > main()
- > {
- > cout << "Hello, World" << endl;
- > }
- >
- > This will compile. Now, include the STL routine for a string, and cout the
- > string that contains hello world. No dice.
- >
- > Sad, isn't it. I sold a 1000 shares of borland yesterday. Happy! I
- > doubled my money. But when word abou this buggy compiler gets out in the
- > mainstream 'puter press, I betcha they're gonna tumble.
- >
- > I've loved borland, but they've finally driven me to MSVC. Sigh...
- >
-